
let http = 'http://47.104.100.73:8080/changeApple'


// 用于手机号快捷登录时的验证
let Verification_code_Api = http + "/user/loginUsePhonenum"

// 用于密码登录时的验证
let login_Api = http + '/user/login'

// /user/loginOut
// 退出登录
let tuichu_Api = http+'/user/loginOut'


// 用户各种形式的商品展示+++++++++++++++++++++++
// 用于展示指定id的商品详细信息
let goodsDetail_Api = http + '/goods/goodsDetail'

// 用于展示每日上新商品
let good_newGoods_Api = http + "/goods/newGoods"

// 用于价格排序展示商品
let price_sort_APi = http + '/goods/price'

//用于限时抢购商品
let goods_buylimit_Api = http + '/goods/buyLimit'

//模糊搜索接口
let goods_query_Api = http + '/goods/query'

//根据类型id 查询商品接口
let goods_query2_Api = http + '/goodsType/goodsSort'

// 通过类型id查询商品集合
let goods_id_Api = http + '/goods/query2'

//根据销量排序 查询商品接口
let goods_salesVolume_Api = http + '/goods/salesVolume'


// 用户信息++++++++++++++++++++++++++++++++++++++++++++++++++
// 用于更改用户信息
let update_User_Api = http + '/user/updateUser'

//上传用户头像
let header_Img_Api = http + '/user/updateHeadImageUrl'


// 用于账户管理
let getUser_Api = http + '/user/getUser'
///goods/goodsDetail
// 根据商品id 展示详情页
let goods_goodsDetail_Api = http + '/goods/goodsDetail'


// 购物车操作接口，比如加入购物车等+++++++++++++++++++++++++++++++

// 根据用户id 显示购物车数据
let cart_cartShow_Api = http + '/cart/cartShow'

// 对购物车物品数量的增加
let cartAdd_Api = http + '/cart/cartAdd'

// 根据商品id将商品添加到购物车
let insertGoods_Api = http + '/cart/insertGoodsToCart'

let obj3 = localStorage.getItem('user')
if(obj3){
    var id = JSON.parse((localStorage.getItem('user'))).id
    function totalnum(){
        $.post(cart_cartShow_Api, { id }, data => {
           console.log(data);
           let number = 0
           data.forEach(v => {
               number += v.number
           })
           console.log(number);
           $('#num').text(number)
       })
   }
   totalnum()
}


//易果快报

// 果果快报预览
let news_flash_Api = http + '/new/newMenu'

// POST
// /new/showNews
// 展示果果新闻的信息
let showNews_Api = http + '/new/showNews'

// /new/updateNumber
// 修改点赞数
let updateNumber_Api = http + '/new/updateNumber'

// /goods/buyLimit
// 限时抢购商品的展示实现
let buyLimit_Api = http + '/goods/buyLimit'

// 轮播图
// /goods/showImg
let showImg_Api = http + '/goods/showImg'

// 收获地址
// /Address/insert
// 新添地址
// POST
let newAddress_Api = http + '/Address/insert'

// GET
// /Address/showAddress
// 显示对应地址
let showAddress_Api = http + '/Address/showAddress'

// GET
// /Address/editAddress
// 获得想要修改的地址信息
let editAddress = http + '/Address/editAddress'

// POST
// /Address/editAddress2
// 修改地址信息
let editAddress2 = http + '/Address/editAddress2'

// POST
// /Address/deleteAddress
// 删除地址
let deleteAddress_Api = http + '/Address/deleteAddress'




//商品所有数量


   

//翔哥注册接口
let a = 1;
let xg_login_Api = 'http://jx.xuzhixiang.top/ap/api/reg.php?'
// 判断用户是否存在
let xg_checkuesr_Api = `http://jx.xuzhixiang.top/ap/api/checkname.php?`
//退出登录
let quit_login_Api = http+'/user/loginOut'

//用户展示用户信息
let show_userMSG_Api = http+'/user/showUser'

//删除购物车商品
let delete_goods_Api = http+'/cart/deleteCart'

//添加订单
let add_list_Api = http+'/order/insertOrder';
//展示订单所有信息
let goods_list_Api = http+'/order/list'


// 礼品卡操作
// Gift Card Controller

// POST
// 礼品卡绑定
let giftCard_setCard_Api = http+'/giftCard/setCard'

// 优惠券
// /discount/list
// 优惠券展示
let discount_list_Api = http+'/discount/list'


// /member/showMemberGoods/{id}
// 会员专属商品信息展示
let showMemberGoods_APi = http+'/member/showMemberGoods/1'